# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=marknote
pkgver=1.1.1
pkgrel=0
pkgdesc="A simple markdown note management app"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://apps.kde.org/marknote/"
license="GPL-3.0-or-later AND CC0-1.0"
depends="
	kirigami
	kirigami-addons
	"
makedepends="
	extra-cmake-modules
	kcolorscheme-dev
	kconfig-dev
	kcoreaddons-dev
	ki18n-dev
	kirigami-addons-dev
	kirigami-dev
	kxmlgui-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qtsvg-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/office/marknote.git"
source="https://download.kde.org/stable/marknote/marknote-$pkgver.tar.xz"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
b5664ae77d64e53f2eb773a3bca88709995ee2fc743490a2cc45bc15affb30a866cf970f5c766c4c8a4f0da8c93cce97c5ef2c21776d2977acd3c3344bda3a6b  marknote-1.1.1.tar.xz
"
